package com.xiaozhichao.nosql.redis.pushsub;

import redis.clients.jedis.JedisPool;

public class Demo {

    private static final String CHANNEL = "channel1";

    public static void main(String[] args) {
        JedisPool pool = new JedisPool("127.0.0.1",6380);

        Thread subThread = new Thread(new SubThread(pool,CHANNEL,new Subscriber()));
        Thread pubThread = new Thread(new Publisher(pool,CHANNEL));

        subThread.start();
        pubThread.start();

    }
}
